package model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "customers")
public class Customers {
	@Id
	@Column(name = "user", length = 45)
	private String user;

	@Column(name = "pass", length = 45)
	private String pass;

	@Column(name = "customerName", length = 45)
	private String customerName;

	@Column(name = "phone", length = 45)
	private String phone;

	@Column(name = "email", length = 45)
	private String email;

	@Column(name = "address", length = 45)
	private String address;

	@OneToMany(targetEntity = Orders.class)
	private Set orders = new HashSet(0);

	public Customers() {
		// TODO Auto-generated constructor stub
	}

	public Customers(String user, String pass, String customerName,
			String phone, String email, String address, Set orders) {
		this.user = user;
		this.pass = pass;
		this.customerName = customerName;
		this.phone = phone;
		this.email = email;
		this.address = address;
		this.orders = orders;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPass() {
		return pass;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Set getOrders() {
		return orders;
	}

	public void setOrders(Set orders) {
		this.orders = orders;
	}
}
